'\" te
.\"  Copyright 1989 AT&T  Copyright (c) 1999 Sun Microsystems, Inc.  All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH ACCTMERG 8 "Feb 22, 1999"
.SH NAME
acctmerg \- merge or add total accounting files
.SH SYNOPSIS
.LP
.nf
\fB/usr/lib/acct/acctmerg\fR [\fB-a\fR] [\fB-i\fR] [\fB-p\fR] [\fB-t\fR] [\fB-u\fR] [\fB-v\fR]
     [\fIfilename\fR] ...
.fi

.SH DESCRIPTION
.sp
.LP
\fBacctmerg\fR reads its standard input and up to nine additional files, all in
the \fBtacct\fR format (see \fBacct.h\fR(3HEAD)) or an \fBASCII\fR version
thereof. It merges these inputs by adding records whose keys (normally user
\fBID\fR and name) are identical, and expects the inputs to be sorted on those
keys.
.SH OPTIONS
.sp
.ne 2
.na
\fB\fB-a\fR\fR
.ad
.RS 6n
Produce output in \fBASCII\fR version of \fBtacct\fR.
.RE

.sp
.ne 2
.na
\fB\fB-i\fR\fR
.ad
.RS 6n
Produce input in \fBASCII\fR version of \fBtacct\fR.
.RE

.sp
.ne 2
.na
\fB\fB-p\fR\fR
.ad
.RS 6n
Print input with no processing.
.RE

.sp
.ne 2
.na
\fB\fB-t\fR\fR
.ad
.RS 6n
Produce a single record that totals all input.
.RE

.sp
.ne 2
.na
\fB\fB-u\fR\fR
.ad
.RS 6n
Summarize by user \fBID,\fR rather than by user \fBID\fR and name.
.RE

.sp
.ne 2
.na
\fB\fB-v\fR\fR
.ad
.RS 6n
Produce output in verbose \fBASCII\fR format, with more precise notation for
floating-point numbers.
.RE

.SH EXAMPLES
.LP
\fBExample 1 \fRUsing the \fBacctmerg\fR command.
.sp
.LP
The following sequence is useful for making "repairs" to any file kept in this
format:

.sp
.in +2
.nf
example% acctmerg \|\|\fB-v\fR \|<\fIfilename1\fR\fB\|>\fR\fIfilename2\fR
.fi
.in -2
.sp

.sp
.LP
Edit \fIfilename2\fR as you want:

.sp
.in +2
.nf
\fBexample% acctmerg \|\|\fR\fB-i\fR\fB \|\fR\fI<filename2\fR\fB\|>\fR\fIfilename1\fR
.fi
.in -2
.sp

.SH SEE ALSO
.sp
.LP
.BR acctcom (1),
.BR acct (2),
.BR acct.h (3HEAD),
.BR utmpx (5),
.BR attributes (7),
.BR acct (8),
.BR acctcms (8),
.BR acctcon (8),
.BR acctprc (8),
.BR acctsh (8),
.BR fwtmp (8),
.BR runacct (8)
.sp
.LP
\fI\fR
